package com.puyuba.puyuba.view.adapter;

import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.puyuba.puyuba.R;
import com.puyuba.puyuba.bean.FindListBean;
import com.pyb.java.commonutil.utils.DateUtils;
import com.pyb.java.commonutil.utils.StringUtil;

public class FindTabAdatper extends BaseQuickAdapter<FindListBean.DataBean,BaseViewHolder> {

    public FindTabAdatper(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder helper, FindListBean.DataBean item) {
        helper.addOnClickListener(R.id.tv_download);

        helper.setText(R.id.tv_user_pro,"需求意向："+item.getEdulevel());
        helper.setText(R.id.tv_user_edu,"当前学历："+item.getSize());
        helper.setText(R.id.tv_user_name,item.getName());
        helper.setText(R.id.tv_data,DateUtils.fromLongToDate("yyyy-MM-dd", item.getGetdatetime()*1000));
        helper.itemView.findViewById(R.id.tv_user_edu).setVisibility(StringUtil.isEmpty(item.getSize()) ? View.GONE : View.VISIBLE);

    }

}
